﻿using System.Windows.Data;
using System.Globalization;
using System.Diagnostics;
using System;

namespace GiveAQuiz.Common.Converters
{
  public class DebugConverter : IValueConverter
  {

    public object Convert(object value, System.Type targetType, object parameter, CultureInfo culture)
    {
      Debug.WriteLine("Convert: TargetType: {0}{3}          Culture:{2}{3}          Value: {1}{3}",
        targetType,
        value,
        culture,
        Environment.NewLine);

      return value;
    }

    public object ConvertBack(object value, System.Type targetType, object parameter, CultureInfo culture)
    {
      Debug.WriteLine("ConvertBack: TargetType: {0}{3}               Culture:{2}{3}              Value: {1}{3}",
        targetType,
        value,
        culture,
        Environment.NewLine);

      return value;
    }
  }
}
